package com.rightsidetech.system.mapper;


import com.rightsidetech.system.dtos.request.SysStoreStorkReplenishInfoReq;
import com.rightsidetech.system.dtos.request.SysStoreStorkReplenishReq;
import com.rightsidetech.system.dtos.request.store.SysAgentStorkReplenishReq;
import com.rightsidetech.system.dtos.response.SysStoreStorkDetailsAppResp;
import com.rightsidetech.system.dtos.response.SysStoreStorkRemindResp;
import com.rightsidetech.system.dtos.response.SysStoreStorkReplenishInfoResp;
import com.rightsidetech.system.dtos.response.store.StoreStoreIdResp;
import com.rightsidetech.system.dtos.response.store.StoreStorkExceedResp;
import com.rightsidetech.system.entity.SysStoreReplenishDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface SysStoreReplenishDetailsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysStoreReplenishDetails record);

    int insertSelective(SysStoreReplenishDetails record);

    SysStoreReplenishDetails selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysStoreReplenishDetails record);

    int updateByPrimaryKey(SysStoreReplenishDetails record);

    List<Long> selectByReplenishId(SysStoreStorkReplenishReq req);

    List<Long> selectAgentByReplenishId(SysAgentStorkReplenishReq req);

    List<SysStoreStorkReplenishInfoResp> selectByReplenish(SysStoreStorkReplenishInfoReq req);

    List<SysStoreStorkDetailsAppResp> selectReplenishInfo(Long id);

    List<SysStoreStorkReplenishInfoResp> selectAgentByReplenish(@Param("req") SysStoreStorkReplenishInfoReq req, @Param("agentId") Long agentId);

    SysStoreReplenishDetails selectLimit(@Param("ids")List<Long> ids,@Param("commodityId") Long commodityId,@Param("specsId") Long specsId);

    int updateNum(@Param("id") Long id, @Param("num") Long num);

    List<StoreStorkExceedResp> selectTimeOut(@Param("agentInfoId")Long agentInfoId,@Param("time")String time);

    List<SysStoreStorkRemindResp> selectTimeOutAll(String time);

    List<SysStoreStorkRemindResp> selectTimeOutAgent(String time);

//    int updateRemind(Long id);

    List<SysStoreStorkDetailsAppResp> timeOutStockInfo(Long storeId);

    SysStoreReplenishDetails selectRetreat(@Param("ids")List<Long> ids,@Param("commodityId") Long commodityId,@Param("specsId") Long specsId);

    List<SysStoreReplenishDetails> selectAllByReplenishIdSysStoreReplenishDetails(Long replenishId);

    List<SysStoreReplenishDetails> statisExpireNum(@Param("time")String time);

    void updateIsStatis(@Param("time")String time);
}